package com.example.service.impl;

import com.example.dao.QyMapper;
import com.example.pojo.*;
import com.example.service.QyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class QyServiceImpl implements QyService {
    @Autowired
    private QyMapper qyMapper;
    @Override
    public List<Fy> t1() {
        List<Fy> fies = qyMapper.selectFy();
        return fies;
    }

    @Override
    public List<Fd> t2() {
        return qyMapper.selectFQDJ();
    }

    @Override
    public List<Qy> t3() {
        return qyMapper.selectQy();
    }

    @Override
    public List<Fname> t4() {
        return qyMapper.selectFSQ();
    }

    @Override
    public List<Fdj> t5() {
        return qyMapper.selectFDJ();
    }

    @Override
    public List<Hx> t6() {
        return qyMapper.selectHx();
    }

    @Override
    public List<Fqh> t7() {
        List<Fqh> fqhs=new ArrayList<>();
        List<Hx> a1 = qyMapper.selectFQHx1();
        fqhs.add(new Fqh("云岩区",a1));
        List<Hx> a2 = qyMapper.selectFQHx2();
        fqhs.add(new Fqh("花溪区",a2));
        List<Hx> a3 = qyMapper.selectFQHx1();
        fqhs.add(new Fqh("南明区",a3));
        List<Hx> a4 = qyMapper.selectFQHx2();
        fqhs.add(new Fqh("观山湖区",a4));
        List<Hx> a5 = qyMapper.selectFQHx1();
        fqhs.add(new Fqh("白云区",a5));
        List<Hx> a6 = qyMapper.selectFQHx2();
        fqhs.add(new Fqh("乌当区",a6));
        return fqhs;
    }


}
